N°9383 - CheckToWrite inside a transition: Incorrect error message display#837
Open
accognet wants to merge 1 commit intosupport/3.2from
Open
N°9383 - CheckToWrite inside a transition: Incorrect error message display#837accognet wants to merge 1 commit intosupport/3.2from
accognet wants to merge 1 commit intosupport/3.2from
Conversation
|
| Filename | Overview |
|---|---|
| pages/UI.php | Adds a dedicated catch (CoreCannotSaveObjectException $e) block before the generic CoreException handler so that getIssues() is used to extract the structured error list; rollback logic mirrors the existing handler. Minor: separator used in implode differs from the string already built by getMessage(). |
| pages/UniversalSearch.php | Removes the OQL filter being leaked as an HTML comment (<!-- $sFilter -->), which is a clean security improvement preventing data model / query exposure in the page source. |
| synchro/synchro_import.php | Replaces the unsafe 'raw_data' sanitization filter with the proper utils::ENUM_SANITIZATION_FILTER_INTEGER constant for data_source_id, preventing non-integer values from being accepted. |
| tests/php-unit-tests/composer.lock | Routine test-dependency bumps including PHPUnit 9.5→9.6, nikic/php-parser 4.x→5.x, doctrine/instantiator 1.5→2.0 (now requires PHP ≥8.1), and several sebastian/* packages. These are dev-only dependencies with no runtime impact. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User submits Stimulus form] --> B{Transaction valid\n& Stimulus allowed?}
B -- No --> Z[Show error message]
B -- Yes --> C[UpdateObjectFromPostedForm]
C --> D{CheckToWrite passes?}
D -- No --> E[sIssues = implode issues array\nShow form again + error modal]
D -- Yes --> F[ApplyStimulus]
F -- Success --> G[bApplyStimulus = true\nShow success message]
F -- CoreCannotSaveObjectException --> H[NEW: Rollback object\nsIssues = implode getIssues\nShow form again + error modal]
F -- CoreException --> I[Rollback object\nsIssues = getMessage\nShow form again + error modal]
F -- bApplyStimulus = false --> J[Show FailedToApplyStimuli error]
Last reviewed commit: 1f86062
Contributor
|
If working on this - perhaps also a good time to take another look at #666 ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
internal